<template>
  <div class="all">
    <el-card class="tableset bg-color" shadow="never" :body-style="{ padding: '0px' }">
      <div class="datePicker">
        <el-date-picker
          v-model="get_home_info.timeQuantum"
          type="daterange"
          align="right"
          unlink-panels
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          :picker-options="pickerOptions"
          @change="getHomeInfo"
        />
      </div>
      <div
        v-loading="dataRequestLoading"
        element-loading-text="正在加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(255, 255, 255, 0.5)"
        class="upside"
      >
        <el-row :gutter="10">
          <el-col :span="6">
            <div class="boxOne">
              <div class="boxTitle">
                <span>订单统计</span>
              </div>

              <span class="number">{{ data_home_info.OrderTotal.order_total }}</span>
              <span style="font-size:20px">{{ '('+'已完成'+data_home_info.OrderTotal.complete_order_total+')' }}</span>

              <div class="boxGroup">
                <div class="boxOneData">
                  <el-row>
                    <el-col :span="12">
                      <span>+{{ data_home_info.OrderTotal.print_order_total +'('+'已完成'+data_home_info.OrderTotal.complete_print_order_total+')' }}</span>
                    </el-col>
                    <el-col :span="12">
                      <span>+{{ data_home_info.OrderTotal.demand_order_total +'('+'已完成'+data_home_info.OrderTotal.complete_demand_order_total+')' }}</span>
                    </el-col>
                    <!-- <el-col :span="8">
                      <span>200%</span>
                    </el-col> -->
                  </el-row>
                </div>
                <div class="boxOneText">
                  <el-row>
                    <el-col :span="12">
                      <span>云打印订单</span>
                    </el-col>
                    <el-col :span="12">
                      <span>需求订单</span>
                    </el-col>
                    <!-- <el-col :span="8">
                      <span>订单增长</span>
                    </el-col> -->
                  </el-row>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="boxTwo">
              <div class="boxTitle">
                <span>成交金额</span>
              </div>
              <div class="number">
                <span>¥ {{ data_home_info.tradingVolume.trading_volume }}</span>
              </div>
              <div class="boxGroup">
                <div class="boxOneData">
                  <el-row>
                    <el-col :span="12">
                      <span>¥ {{ data_home_info.tradingVolume.print_trading_volume }}</span>
                    </el-col>
                    <el-col :span="12">
                      <span>¥ {{ data_home_info.tradingVolume.demand_trading_volume }}</span>
                    </el-col>
                  </el-row>
                </div>
                <div class="boxOneText">
                  <el-row>
                    <el-col :span="12">
                      <span>云打印订单</span>
                    </el-col>
                    <el-col :span="12">
                      <span>需求订单</span>
                    </el-col>
                  </el-row>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="boxThree">
              <div class="boxTitle">
                <span>总支出</span>
              </div>
              <div id="pieChart01" class="boxThreeChart" />
            </div>
          </el-col>
          <el-col :span="6">
            <div class="boxFour">
              <div class="boxTitle">
                <span>优惠券</span>
              </div>
              <div class="number">
                <span>{{ data_home_info.discountCoupon.discount_coupon_num }}</span>
                <span style="font-size:20px">（发放数）</span>
              </div>
              <div class="boxGroup">
                <div class="boxOneData">
                  <el-row>
                    <el-col :span="8">
                      <span>{{ data_home_info.discountCoupon.get_discount_coupon_num }}</span>
                    </el-col>
                    <el-col :span="8">
                      <span>{{ data_home_info.discountCoupon.use_discount_coupon_num }}</span>
                    </el-col>
                    <el-col :span="8">
                      <span>{{ data_home_info.discountCoupon.expiry_discount_coupon_num }}</span>
                    </el-col>
                  </el-row>
                </div>
                <div class="boxOneText">
                  <el-row>
                    <el-col :span="8">
                      <span>领取数</span>
                    </el-col>
                    <el-col :span="8">
                      <span>使用数</span>
                    </el-col>
                    <el-col :span="8">
                      <span>失效数</span>
                    </el-col>
                  </el-row>
                </div>
              </div>
            </div>
          </el-col>
        </el-row>
      </div>
      <div
        v-loading="dataRequestLoading"
        element-loading-text="正在加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(255, 255, 255, 0.5)"
        class="middle"
      >
        <el-row :gutter="10">
          <el-col :span="18">
            <div id="LineChart01" class="middleChart" />
          </el-col>
          <el-col :span="6">
            <div class="middleMessage">
              <div class="boxTitle">
                <span>故障通知</span>
                <!-- <el-button
                  class="inputMessageButton"
                  plain
                  type="text"
                  size="mini"
                  @click="changeMessageDialog='true'"
                >新增通知
                </el-button> -->
              </div>
              <div class="middleMessageNumber">
                <el-row>
                  <el-col :span="8">
                    <div>
                      <el-tag effect="dark" class="boxTag" color="#fb7293">{{ data_home_info.malfunctionIsDealToal.is_deal0_total }}</el-tag>
                      <span>未处理</span>
                    </div>
                  </el-col>
                  <el-col :span="8">
                    <div>
                      <el-tag effect="dark" class="boxTag" color="#e7bcf3">{{ data_home_info.malfunctionIsDealToal.is_deal1_total }}</el-tag>
                      <span>已处理</span>
                    </div>
                  </el-col>
                  <el-col :span="8">
                    <div>
                      <el-tag effect="dark" class="boxTag" color="#9fe6b8">{{ data_home_info.malfunctionIsDealToal.is_deal2_total }}</el-tag>
                      <span>待跟进</span>
                    </div>
                  </el-col>
                </el-row>
                <div v-for="(item, index) in data_home_info.malfunctionList" :key="index" class="middleMessageDetails">
                  <el-row :gutter="10">
                    <el-col :span="2">
                      <div :class="item.color" />
                    </el-col>
                    <el-col :span="13 ">
                      <div>
                        <router-link to="/malfunction-manage/malfunction">
                          <el-link target="_blank">{{ item.malfunction }}</el-link>
                        </router-link>
                      </div>
                    </el-col>
                    <el-col :span="7">
                      <div>
                        <span style="font-size:14px">{{ item.create_time }}</span>
                      </div>
                    </el-col>
                  </el-row>
                </div>
              </div>
              <!-- <div class="middleMessageDetails">
                <el-row :gutter="10">
                  <el-col :span="2">
                    <div class="circleTwo"></div>
                  </el-col>
                  <el-col :span="22">
                    <div>
                      <span>打印机2出现异常，错误代码为2020</span>
                    </div>
                  </el-col>
                </el-row>
              </div>
              <div class="middleMessageDetails">
                <el-row :gutter="10">
                  <el-col :span="2">
                    <div class="circleThree"></div>
                  </el-col>
                  <el-col :span="22">
                    <div>
                      <span>打印机2出现异常，错误代码为2020</span>
                    </div>
                  </el-col>
                </el-row>
              </div>
              <div class="middleMessageDetails">
                <el-row :gutter="10">
                  <el-col :span="2">
                    <div class="circleFour"></div>
                  </el-col>
                  <el-col :span="22">
                    <div>
                      <span>打印机2出现异常，错误代码为2020打印机2出现异常，错误代码为2020</span>
                    </div>
                  </el-col>
                </el-row>
              </div>
              <div class="middleMessageDetails">
                <el-row :gutter="10">
                  <el-col :span="2">
                    <div class="circleFive"></div>
                  </el-col>
                  <el-col :span="22">
                    <div>
                      <span>打印机2出现异常，错误代码为2020打印机2出现异常，错误代码为2020</span>
                    </div>
                  </el-col>
                </el-row>
              </div>-->
            </div>
          </el-col>
        </el-row>
      </div>
      <div
        v-loading="dataRequestLoading"
        element-loading-text="正在加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(255, 255, 255, 0.5)"
        class="middleBottom"
      >
        <el-row :gutter="10">
          <el-col :span="9">
            <div class="middleBottomBoxOne">
              <div class="boxTitle">
                <span>云打印订单</span>
              </div>
              <el-row :gutter="30">
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#ffdb5c">{{ data_home_info.OrderStatus.print_order_status0_num }}</el-tag>
                    <span>未支付</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#ff9f7f">{{ data_home_info.OrderStatus.print_order_status1_num }}</el-tag>
                    <span>已取消</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#32c5e9">{{ data_home_info.OrderStatus.print_order_status2_num }}</el-tag>
                    <span>已支付</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#ff9f7f">{{ data_home_info.OrderStatus.print_order_status3_num }}</el-tag>
                    <span>退款中</span>
                  </div>
                </el-col>
              </el-row>
              <el-row class="divide" :gutter="30">
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#fb7293">{{ data_home_info.OrderStatus.print_order_status4_num }}</el-tag>
                    <span>已退款</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#e7bcf3">{{ data_home_info.OrderStatus.print_order_status5_num }}</el-tag>
                    <span>申诉中</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#9fe6b8">{{ data_home_info.OrderStatus.print_order_status6_num }}</el-tag>
                    <span>已完成</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#fb7293">{{ data_home_info.OrderStatus.print_order_status7_num }}</el-tag>
                    <span>已发布需求</span>
                  </div>
                </el-col>
              </el-row>
              <el-row class="divide" :gutter="30">
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#e7bcf3">{{ data_home_info.OrderStatus.print_order_status8_num }}</el-tag>
                    <span>特殊订单</span>
                  </div>
                </el-col>
              </el-row>
            </div>
          </el-col>
          <el-col :span="9">
            <div class="middleBottomBoxTwo">
              <div class="boxTitle">
                <span>需求订单</span>
              </div>
              <el-row :gutter="30" type="flex" justify="space-between">
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#ffdb5c">{{ data_home_info.OrderStatus.demand_order_status0_num }}</el-tag>
                    <span>未支付</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#ff9f7f">{{ data_home_info.OrderStatus.demand_order_status1_num }}</el-tag>
                    <span>待骑手接单</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#32c5e9">{{ data_home_info.OrderStatus.demand_order_status2_num }}</el-tag>
                    <span>已取消</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#ff9f7f">{{ data_home_info.OrderStatus.demand_order_status3_num }}</el-tag>
                    <span>配送中</span>
                  </div>
                </el-col>
              </el-row>
              <el-row class="divide" :gutter="30" type="flex" justify="space-between">
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#fb7293">{{ data_home_info.OrderStatus.demand_order_status4_num }}</el-tag>
                    <span>已送达</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#e7bcf3">{{ data_home_info.OrderStatus.demand_order_status5_num }}</el-tag>
                    <span>申诉中</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#9fe6b8">{{ data_home_info.OrderStatus.demand_order_status6_num }}</el-tag>
                    <span>退款中</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#fb7293">{{ data_home_info.OrderStatus.demand_order_status7_num }}</el-tag>
                    <span>已退款</span>
                  </div>
                </el-col>
              </el-row>
              <el-row class="divide" :gutter="30" type="flex" justify="space-between">
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#e7bcf3">{{ data_home_info.OrderStatus.demand_order_status8_num }}</el-tag>
                    <span>确认收货</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#9fe6b8">{{ data_home_info.OrderStatus.demand_order_status9_num }}</el-tag>
                    <span>待审核</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#ff9f7f">{{ data_home_info.OrderStatus.demand_order_status10_num }}</el-tag>
                    <span>审核不通过</span>
                  </div>
                </el-col>
                <el-col :span="6">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#32c5e9">{{ data_home_info.OrderStatus.demand_order_status11_num }}</el-tag>
                    <span>特殊订单</span>
                  </div>
                </el-col>
              </el-row>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="middleBottomBoxThree">
              <div class="boxTitle">
                <span>耗材需求</span>
              </div>
              <el-row class="divide" :gutter="10">
                <el-col :span="8">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#ffdb5c">{{ data_home_info.consumableProcurementTotal.consumable_type0_total }}</el-tag>
                    <span>纸张</span>
                  </div>
                </el-col>
                <el-col :span="8">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#ff9f7f">{{ data_home_info.consumableProcurementTotal.consumable_type1_total }}</el-tag>
                    <span>墨水</span>
                  </div>
                </el-col>
                <el-col :span="8">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#32c5e9">{{ data_home_info.consumableProcurementTotal.consumable_type2_total }}</el-tag>
                    <span>打印头</span>
                  </div>
                </el-col>
              </el-row>
              <!-- <div class="boxTitle">
                <span>故障</span>
              </div>
              <el-row class="divide">
                <el-col :span="8">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#fb7293">1000</el-tag>
                    <span>未处理</span>
                  </div>
                </el-col>
                <el-col :span="8">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#e7bcf3">1000</el-tag>
                    <span>处理中</span>
                  </div>
                </el-col>
                <el-col :span="8">
                  <div>
                    <el-tag effect="dark" class="boxTag" color="#9fe6b8">1000</el-tag>
                    <span>已处理</span>
                  </div>
                </el-col>
              </el-row> -->
            </div>
          </el-col>
        </el-row>
      </div>
      <div
        v-loading="dataRequestLoading"
        element-loading-text="正在加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(255, 255, 255, 0.5)"
        class="bottom"
      >
        <el-row :gutter="10">
          <el-col :span="18">
            <div id="LineChart02" class="bottomChart" />
          </el-col>
          <el-col :span="6">
            <div>
              <!-- <div class="bottomBox"> -->
              <!-- <div class="boxTitle">
                  <span>打印总数</span>
                </div> -->
              <!-- <div class="number">
                  <span>2020</span>
                </div> -->
              <!-- <div class="boxGroup">
                  <div class="boxOneData">
                    <el-row>
                      <el-col :span="8">
                        <span>+100</span>
                      </el-col>
                      <el-col :span="8">
                        <span>+200</span>
                      </el-col>
                      <el-col :span="8">
                        <span>200%</span>
                      </el-col>
                    </el-row>
                  </div>
                  <div class="boxOneText">
                    <el-row>
                      <el-col :span="8">
                        <span>A4黑白页面数</span>
                      </el-col>
                      <el-col :span="8">
                        <span>A4彩色页面数</span>
                      </el-col>
                      <el-col :span="8">
                        <span>彩色照片</span>
                      </el-col>
                    </el-row>
                  </div>
                </div> -->
              <!-- </div> -->
              <div class="costRecordBox">
                <div class="boxTitle">
                  <span>消费记录</span>
                </div>
                <!-- <div class="costRecordBoxDetails">
                  <el-row>
                    <el-col :span="6">
                      <div>
                        <span>{{ data_home_info.expenditureRecordList.nick_name }}</span>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div>
                        <span>{{ data_home_info.expenditureRecordList.change_amount }}</span>
                      </div>
                    </el-col>
                    <el-col :span="14">
                      <div>
                        <span>{{ data_home_info.expenditureRecordList.create_time }}</span>
                      </div>
                    </el-col>
                  </el-row>
                </div> -->
                <div v-for="(item, index) in data_home_info.expenditureRecordList" :key="index" class="costRecordBoxDetails">
                  <el-row>
                    <el-col :span="6">
                      <div>
                        <span>{{ item.nick_name }}</span>
                      </div>
                    </el-col>
                    <el-col :span="14">
                      <div>
                        <span>{{ item.remark }}</span>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div>
                        <span>{{ item.change_amount }}</span>
                      </div>
                    </el-col>
                  </el-row>
                </div>
              </div>
            </div>
          </el-col>
        </el-row>
      </div>
      <!-- 新增通知 -->
      <el-dialog
        title="新增通知"
        :visible.sync="changeMessageDialog"
        width="500px"
        :close-on-click-modal="false"
      >
        <el-form status-icon size="medium" label-width="80px">
          <el-form-item prop="status" size="medium" label="通知">
            <el-input size="medium" placeholder="请输入新通知" />
          </el-form-item>
        </el-form>
        <span slot="footer">
          <el-button size="mini" @click="changeMessageDialog = false">取 消</el-button>
          <el-button size="mini" type="primary">保 存</el-button>
        </span>
      </el-dialog>
      <!-- 新增通知 -->
    </el-card>
  </div>
</template>

<script>
import { pickerOptionsMixin } from '@/mixins/pickerOptions'
import { getDatatime } from '@/common/js/until'
import { getHomeInfo } from '@/api/home'
import { LineChart01, LineChart02, pieChart01 } from '@/common/js/EchartsModel'
import '@/common/js/macarons.js'

// 引入echarts
const echarts = require('echarts')

export default {
  name: 'Home',
  mixins: [pickerOptionsMixin],
  data() {
    return {
      // loading开关
      dataRequestLoading: false,

      circle: [
        'circle1',
        'circle2',
        'circle3',
        'circle4',
        'circle5'
      ],
      changeMessageDialog: false, // 新增通知

      // 请求接口参数
      get_home_info: {
        timeQuantum: []
      },

      // 返回值
      data_home_info: {
        OrderStatus: {
          demand_order_status0_num: '',
          demand_order_status1_num: '',
          demand_order_status2_num: '',
          demand_order_status3_num: '',
          demand_order_status4_num: '',
          demand_order_status5_num: '',
          demand_order_status6_num: '',
          demand_order_status7_num: '',
          demand_order_status8_num: '',
          demand_order_status9_num: '',
          demand_order_status10_num: '',
          demand_order_status11_num: '',
          print_order_status0_num: '',
          print_order_status1_num: '',
          print_order_status2_num: '',
          print_order_status3_num: '',
          print_order_status4_num: '',
          print_order_status5_num: '',
          print_order_status6_num: '',
          print_order_status7_num: '',
          print_order_status8_num: ''
        },
        OrderTotal: {
          complete_demand_order_total: '',
          complete_order_total: '',
          complete_print_order_total: '',
          order_total: '',
          print_order_total: ''
        },
        tradingVolume: {
          trading_volume: '',
          print_trading_volume: '',
          demand_trading_volume: ''
        },
        malfunctionIsDealToal: {
          is_deal0_total: '',
          is_deal1_total: '',
          is_deal2_total: ''
        },
        consumableProcurementTotal: {
          consumable_type0_total: '',
          consumable_type1_total: '',
          consumable_type2_total: ''
        },
        expenditureRecordList: {
          nick_name: '',
          change_amount: '',
          remark: '',
          create_time: ''
        },
        discountCoupon: {
          discount_coupon_num: '',
          get_discount_coupon_num: '',
          use_discount_coupon_num: '',
          expiry_discount_coupon_num: ''
        }
      }
    }
  },
  mounted() {
    const getYear = new Date().getFullYear()
    const getMonth = new Date().getMonth() < 10 ? '0' + (new Date().getMonth()) : new Date().getMonth()
    const getDay = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
    this.get_home_info.timeQuantum = [new Date(getYear, getMonth, getDay - 5, 0, 0), new Date(getYear, getMonth, getDay, 0, 0)]
    this.getHomeInfo() // 获取后台首页数据
  },
  methods: {
    // 获取后台首页数据
    getHomeInfo() {
      this.dataRequestLoading = true
      this.get_home_info.timeQuantum[0] = getDatatime(this.get_home_info.timeQuantum[0])
      this.get_home_info.timeQuantum[1] = getDatatime(this.get_home_info.timeQuantum[1])
      getHomeInfo(this.get_home_info).then(res => {
        this.dataRequestLoading = false
        this.data_home_info = res.result
        let i = 1
        this.data_home_info.malfunctionList.forEach((val, k) => {
          if (k > 4 && i === 6) {
            i = 1
          }
          if (k < 5 || i < 6) {
            val['color'] = 'circle' + i
          }
          i++
        })
        this.getPillar() // 生成总支出饼状图Echarts
        this.getBusinessPillar() // 生成营业额折线图 Echarts
        this.getPaperNumberPillar() // 生成打印数量折线图 Echarts
      })
    },

    // 生成总支出饼状图Echarts
    getPillar() {
      const legend = ['余额提现', '退款到余额', '直接退款', '日常支出']
      const seriesDataArr = this.data_home_info.getPillar.seriesDataArr
      const myChart = echarts.init(document.getElementById('pieChart01'), 'macarons')
      pieChart01(myChart, legend, seriesDataArr) // 饼状图分析
    },

    // 生成营业额折线图 Echarts
    getBusinessPillar() {
      const title = '每日营业额'
      const legend = this.data_home_info.getBusinessPillar.legend
      const xAxisName = '金额/元'
      const yAxisName = '星期/天'
      const yAxisArr = this.data_home_info.getBusinessPillar.yAxisArr
      const seriesArr = this.data_home_info.getBusinessPillar.seriesArr
      const myChart = echarts.init(document.getElementById('LineChart01'), 'macarons')
      LineChart01(myChart, title, legend, xAxisName, yAxisName, yAxisArr, seriesArr) // 折线图分析
    },

    // 生成打印数量折线图 Echarts
    getPaperNumberPillar() {
      const title = '打印数量统计'
      const legend = this.data_home_info.getPaperNumberPillar.legend
      const xAxisName = '星期/天'
      const xAxisArr = this.data_home_info.getPaperNumberPillar.xAxisArr
      const yAxisName = '数量/张'
      const seriesArr = this.data_home_info.getPaperNumberPillar.seriesArr
      const myChart = echarts.init(document.getElementById('LineChart02'), 'macarons')
      LineChart02(myChart, title, legend, xAxisName, xAxisArr, yAxisName, seriesArr) // 折线图分析
    }
  }
}
</script>

<style scoped lang="scss">
.bg-color {
  background-color: #fafbff;
}

.all {
  margin: 10px;
  color: #495057;
  .boxTitle {
    font-size: 20px;
    padding-bottom: 20px;
  }
  .datePicker{
    padding-left: 10px;
    padding-right: 10px;
  }
  .upside {
    margin-top: 20px;
    padding-left: 10px;
    padding-right: 10px;
    .boxOne {
      box-shadow: 0 0 10px #f5f9fc;
      border: 1px solid #f5f9fc;
      height: 210px;
      width: 100%;
      background-color: #ffffff;
      padding: 20px;
      color: #495057;
      .number {
        font-size: 32px;
      }
      .boxGroup {
        width: 100%;
        text-align: center;
        margin-top: 40px;
      }
    }
    .boxTwo {
      box-shadow: 0 0 10px #f5f9fc;
      border: 1px solid #f5f9fc;
      height: 210px;
      width: 100%;
      background-color: #ffffff;
      padding: 20px;
      color: #495057;
      .number {
        font-size: 32px;
      }
      .boxGroup {
        width: 100%;
        text-align: center;
        margin-top: 40px;
      }
    }
    .boxThree {
      box-shadow: 0 0 10px #f5f9fc;
      border: 1px solid #f5f9fc;
      height: 210px;
      width: 100%;
      background-color: #ffffff;
      padding: 20px;
      .boxThreeChart {
        width: 140%;
        height: 140px;
      }
    }
    .boxFour {
      box-shadow: 0 0 10px #f5f9fc;
      border: 1px solid #f5f9fc;
      height: 210px;
      width: 100%;
      background-color: #ffffff;
      padding: 20px;
      .number {
        font-size: 32px;
      }
      .boxGroup {
        width: 100%;
        text-align: center;
        margin-top: 40px;
      }
    }
  }
  .middle {
    width: 100%;
    height: 500px;
    margin-top: 10px;
    padding-left: 10px;
    padding-right: 10px;

    .middleChart {
      background-color: #ffffff;
      width: 100%;
      height: 500px;
      padding: 20px;
    }
    .middleMessage {
      background-color: #ffffff;
      width: 100%;
      height: 500px;
      padding: 20px;
      overflow: hidden;
      overflow: auto;
      .inputMessageButton {
        position: relative;
        float: right;
      }
      .middleMessageNumber {
        margin-top: 14px;
        .boxTag {
          border: 0;
        }
      }
      .middleMessageDetails {
        margin-top: 20px;
        margin-bottom: 20px;
        .circle1 {
          width: 20px;
          height: 20px;
          margin-top: -2px;
          background-color: #e273b6;
          border-radius: 50%;
          -moz-border-radius: 50%;
          -webkit-border-radius: 50%;
        }
        .circle2 {
          width: 20px;
          height: 20px;
          margin-top: -2px;
          background-color: #ff9f7f;
          border-radius: 50%;
          -moz-border-radius: 50%;
          -webkit-border-radius: 50%;
        }
        .circle3 {
          width: 20px;
          height: 20px;
          margin-top: -2px;
          background-color: #ffdb5c;
          border-radius: 50%;
          -moz-border-radius: 50%;
          -webkit-border-radius: 50%;
        }
        .circle4 {
          width: 20px;
          height: 20px;
          margin-top: -2px;
          background-color: #67e0e3;
          border-radius: 50%;
          -moz-border-radius: 50%;
          -webkit-border-radius: 50%;
        }
        .circle5 {
          width: 20px;
          height: 20px;
          margin-top: -2px;
          background-color: #37a2da;
          border-radius: 50%;
          -moz-border-radius: 50%;
          -webkit-border-radius: 50%;
        }
      }
    }
  }
  .middleBottom {
    margin-top: 10px;
    padding-left: 10px;
    padding-right: 10px;
    .boxTag {
      border: 0;
    }
    .middleBottomBoxOne {
      box-shadow: 0 0 10px #f5f9fc;
      border: 1px solid #f5f9fc;
      height: 220px;
      width: 100%;
      background-color: #ffffff;
      padding: 20px;
      color: #495057;
      .divide {
        padding-top: 20px;
      }
    }
    .middleBottomBoxTwo {
      box-shadow: 0 0 10px #f5f9fc;
      border: 1px solid #f5f9fc;
      height: 220px;
      width: 100%;
      background-color: #ffffff;
      padding: 20px;
      color: #495057;
      .divide {
        padding-top: 22px;
      }
    }
    .middleBottomBoxThree {
      box-shadow: 0 0 10px #f5f9fc;
      border: 1px solid #f5f9fc;
      height: 220px;
      width: 100%;
      background-color: #ffffff;
      padding: 20px;
      color: #495057;
      .divide {
        padding-top: 30px;
      }
    }
    .middleBottomBoxFour {
      box-shadow: 0 0 10px #f5f9fc;
      border: 1px solid #f5f9fc;
      height: 120px;
      width: 100%;
      background-color: #ffffff;
      padding: 20px;
      color: #495057;
    }
  }
  .bottom {
    width: 100%;
    height: 500px;
    margin-top: 10px;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 10px;
    .bottomChart {
      background-color: #ffffff;
      width: 100%;
      height: 500px;
      padding: 20px 20px 0 20px;
    }
    .bottomBox {
      background-color: #ffffff;
      width: 100%;
      height: 200px;
      padding: 20px;
      .number {
        font-size: 32px;
      }
      .boxGroup {
        width: 100%;
        text-align: center;
        margin-top: 40px;
      }
    }
    .costRecordBox {
      background-color: #ffffff;
      width: 100%;
      height: 500px;
      padding: 20px;
      overflow: hidden;
      overflow: auto;
      margin-top: 0;
      .costRecordBoxDetails {
        padding-bottom: 20px
      }
    }
  }
}
        .circle1 {
          width: 20px;
          height: 20px;
          margin-top: -2px;
          background-color: #e273b6;
          border-radius: 50%;
          -moz-border-radius: 50%;
          -webkit-border-radius: 50%;
        }
        .circle2 {
          width: 20px;
          height: 20px;
          margin-top: -2px;
          background-color: #ff9f7f;
          border-radius: 50%;
          -moz-border-radius: 50%;
          -webkit-border-radius: 50%;
        }
        .circle3 {
          width: 20px;
          height: 20px;
          margin-top: -2px;
          background-color: #ffdb5c;
          border-radius: 50%;
          -moz-border-radius: 50%;
          -webkit-border-radius: 50%;
        }
        .circle4 {
          width: 20px;
          height: 20px;
          margin-top: -2px;
          background-color: #67e0e3;
          border-radius: 50%;
          -moz-border-radius: 50%;
          -webkit-border-radius: 50%;
        }
        .circle5 {
          width: 20px;
          height: 20px;
          margin-top: -2px;
          background-color: #37a2da;
          border-radius: 50%;
          -moz-border-radius: 50%;
          -webkit-border-radius: 50%;
        }
</style>
